package com.powernode.feign;

/**
 * @version 1.0
 * @Date 2024/8/19 13:58
 * @Author 付~~~
 */

import com.powernode.domain.Prod;
import com.powernode.feign.sentinel.StoreProdFeignSentinel;
import com.powernode.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 门店业务模块调用商品业务模块的feign接口
 */

@FeignClient(value = "product-service",fallback = StoreProdFeignSentinel.class)     //微服务名称，调用该微服务    {fallback:熔断机制}
public interface StoreProdFeign {
    /**
     * 根据商品标识获取商品详情集合
     * @param prodIdList 商品id集合
     * @return
     */
    @GetMapping("prod/prod/getProdListByIds")
    public Result<List<Prod>> getProdListByIds(@RequestParam List<Long> prodIdList);
}
